﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.RoleMenus
{


    public class RoleMenuConfig : IEntityTypeConfiguration<RoleMenu>
    {
        public void Configure(EntityTypeBuilder<RoleMenu> builder)
        {
            builder.HasComment("角色-菜单表");
            builder.HasKey(d => new { d.RoleId, d.MenuId });
            builder.ToTable("role_menu");
            builder.Property(x => x.RoleId).IsRequired().HasComment("角色Id");
            builder.Property(x => x.MenuId).IsRequired().HasComment("菜单Id");

        }
    }
}
